<!doctype html>
<html>

<head>
  <!-- css文件 -->
  {include file="public/title" /}
</head>

<body data-type="login">

  <div class="am-g myapp-login">
	<div class="myapp-login-logo-block  tpl-login-max">
		<div class="myapp-login-logo-text">
			<div class="myapp-login-logo-text">
				<span> 会员管理系统 </span> <i class="am-icon-skyatlas"></i>
			</div>
		</div>
		<div class="login-font">
			<i>技术支持 </i> 微信 <span> 13015194646</span>
		</div>
		<div class="am-u-sm-10 login-am-center">
			<form class="am-form" id="formDate" onsubmit="return false">
				<fieldset>
					<div class="am-form-group">
						<input type="text" name="user" class="" id="doc-ipt-email-1" placeholder="请输入用户名">
          </div>
					<div class="am-form-group">
						<input type="password" name="password" class="" id="doc-ipt-pwd-1" placeholder="请输入密码">
          </div>
          <br/>
          <div class="am-form-inline">
            <div class="am-form-group">
              <input type="text" name="code" placeholder="请输入验证码">
            </div>
            <div class="am-form-group">
              <img src="{:captcha_src()}"  style="cursor:pointer;" width="70%" onclick="this.src='{:captcha_src()}'" alt="captcha" />
            </div>
          </div>
          
					<p><button type="submit" id="subForm" class="am-btn am-btn-default">登录</button></p>
				</fieldset>
			</form>
		</div>
	</div>
</div>
  <!-- js -->
  {include file="public/foot" /}  
  <script type="text/javascript">
    $('#subForm').click(function(){
      var formDate = $('#formDate').serialize();
      $.ajax({
        url:"{:url('Login/index')}",
        type:'post',
        data:formDate,
        success:function(data){
          if(data.statu == 200){
            location.href = "{:url('Index/index')}"
          }else{
            layer.alert(data.info, {icon: 5});
          }
        }
      })
    })
  </script>
</body>
</html>